package time

import (
	"time"
)

//秒
func GetTimestamp() int64 {
	now := time.Now()
	//fmt.Println(now.Unix())           // 1565084298 秒
	return now.Unix()
}

//毫秒
func GetTimestampMillisecond() int64 {
	now := time.Now()
	//fmt.Println(now.UnixNano() / 1e6) // 1565084298178 毫秒
	return now.UnixNano() / 1e6
}

//纳秒
func GetTimestampNanosecond() int64 {
	now := time.Now()
	//fmt.Println(now.UnixNano())       // 1565084298178502600 纳秒
	return now.UnixNano()
}
